require 'albacore'

build_directory = "./build/"
configuration = :Release
solution = "NAsserter.sln"


msbuild :clean do |msb|
  msb.properties :configuration => configuration, :outdir => build_directory
  msb.solution = solution
  msb.targets :Clean
end

msbuild :build do |msb|
  msb.properties :configuration => configuration, :outdir => build_directory, :platform => :AnyCPU
  msb.solution = solution
  msb.targets :Build
  #msb.verbosity = "detailed"
end

msbuild :rebuild do |msb|
  msb.properties :configuration => configuration, :outdir => build_directory, :platform => :AnyCPU
  msb.solution = solution
  msb.targets :Clean, :Build
  #msb.verbosity = "detailed"
end

nunit :test do |nunit|
	nunit.path_to_command = "C:/Program Files/NUnit 2.5.4/bin/net-2.0/nunit-console.exe"
	nunit.assemblies "NAsserter.Tests/build/NAsserter.Tests.dll"
end

task :package => [:rebuild, :zip]

zip :zip do |zip|
  zip.directories_to_zip "./NAsserter/build"
  zip.output_file = 'NAsserter.zip'
end